#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin>>s;
	int len = s.size()-1;
	int sum = 0, cnt = 1;
	for(int i = 0;i < len;i++)
	{
		if(s[i] != '-')
		{
			sum += (s[i]-'0')*cnt;
			cnt++;
		}
	}
	int ans = s[len] == 'X' ? 10 : s[len]-'0';
	if(sum % 11 == ans)
		cout<<"Right";
	else
	{
		if(sum % 11 == 10)
			s[len] = 'X';
		else
			s[len] = sum%11+'0';
		cout<<s;
	}
	return 0;
}

